package com.drcoffee.drcoffeemall.controller;

import com.drcoffee.drcoffeemall.entry.Result;
import com.drcoffee.drcoffeemall.entry.Type;
import com.drcoffee.drcoffeemall.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RequestMapping("/type")
@RestController
public class TypeController {

    @Autowired
    TypeService typeService;

    @GetMapping("/getTypeAll")
    public Map<String, Object> getTypeAll(@RequestParam String type_class) {
        return typeService.getTypeAll(type_class);
    }

    @GetMapping("/getType")
    public Map<String, Object> getType(@RequestParam String type_class, @RequestParam Integer bsh_two) {
        return typeService.getType(type_class, bsh_two);
    }

//    @GetMapping("/getTypeById")
//    public Map<String, Object> getTypeById(@RequestParam Integer machine_id, @RequestParam String type_class, @RequestParam Integer bsh_two) {
//        return typeService.getTypeById(machine_id, type_class, bsh_two);
//    }

//    @GetMapping("/getIFilePath")
//    public Result getTypeById(@RequestParam Integer typ, @RequestParam String type_class, @RequestParam Integer bsh_two) {
//        return typeService.getTypeById(machine_id, type_class, bsh_two);
//    }


}
